package com.zhida.smartcontrol.dialog.delqddialog;

import com.yanzhenjie.kalle.Params;
import com.zhida.smartcontrol.common.Api;
import com.zhida.smartcontrol.knet.KalleCallBack;
import com.zhida.smartcontrol.mvp.BasePresenterImpl;

public class DelQdDialogPresenter extends BasePresenterImpl<DelQdDialogContract.View> implements DelQdDialogContract.Presenter {

    @Override
    public void deleteGroup(String id) {
        Params params = Params.newBuilder()
                .add("id", id)
                .build();
        mKalleCenter.delete(Api.GROUP_DELETE, params, true, new KalleCallBack() {
            @Override
            public void onSuccess(String result, String msg) {
                mView.showMsg(msg);
                mView.onSuccess();
            }

            @Override
            public void onFailed(String msg) {
                mView.showMsg(msg);
            }
        });
    }
}
